#ifndef __FZCONTROLLER_H
#define __FZCONTROLLER_H
#include <stdio.h>
#include <dlfcn.h>
#include <libxml/xmlreader.h>
#include <libxml/xpath.h>
#include <sys/stat.h>
#include <string.h>
#include <glob.h>
class FSController;
#include "fslayer.h"

#define FZ_HOST_ID 1
#define FZ_HOST_URI 2

class FSController {
	public:
		FSController();
		xmlDocPtr loadHostConfig(const int key, const char* value);
		xmlDocPtr loadHostConfig(const char *spec_1);
		const char *getStringOpt(const char *opt_name);
		const char *getHostURI();
		int main(int argc, char **argv, FSLayer *fs);
		int main(int argc, char **argv, PtrList<FSLayer*> *fs);
		int error(const char *msg);
		PtrList<FSLayer*> *top;
	private:
		xmlDocPtr loadConfig(const char *path_1);
		xmlNodePtr loadIncludes(xmlNodePtr root);
		xmlNodePtr loadSubconfig(xmlNodePtr cur, const char *src);
		xmlDocPtr host_config;
		struct fuse_operations *fuse_ops;
};

#endif
